package com.king.modules.system.domain;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.king.common.annotation.MetaData;
import com.king.framework.base.domain.YyTreeEntity;

/**
 * 菜单权限表 sys_menu
 * 
 * @author king
*/
@TableName("sys_menu")
public class SysMenuEntity extends YyTreeEntity {
	
	@MetaData("路由名称")
	private String name;
	
	@MetaData("路由地址 ")
	private String path;//如果是按钮，则为按钮标识，如add,edit

	@MetaData("组件路径 ")
	private String component;

	@MetaData("路由参数 ")
	private String query;

//	@MetaData("是否为外链（0是 1否） ")
//	private String isframe;

	@MetaData("是否缓存（0缓存 1不缓存） ")
	private String iscache;

	@MetaData("类型（M目录 C菜单 F按钮） ")
	private String menutype;//UserConstants （目录）  "M"; （菜单） "C"; （按钮） "F"; （路由） "R"; 	

	@Deprecated
	@MetaData("显示状态（0显示 1隐藏） ")
	private String visible;

	@MetaData("菜单状态（0正常 1停用） ")
	private String status;

	@MetaData("权限字符串 ")
	private String perms;

	@MetaData("菜单图标 ")
	private String icon;

	@TableField("memo")
	private String memo;

	@TableField(exist = false)
	private boolean checked;//是否勾选
	
	@MetaData("子菜单 ")
	@TableField(exist = false)
	private List<SysMenuEntity> children = new ArrayList<SysMenuEntity>();
	
	@JsonInclude(JsonInclude.Include.NON_EMPTY)
	@TableField(exist = false)
	private Map<String, Object> params;
	

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getComponent() {
		return component;
	}

	public void setComponent(String component) {
		this.component = component;
	}

	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

	public String getIscache() {
		return iscache;
	}

	public void setIscache(String iscache) {
		this.iscache = iscache;
	}

	public String getMenutype() {
		return menutype;
	}

	public void setMenutype(String menutype) {
		this.menutype = menutype;
	}

	public String getVisible() {
		return visible;
	}

	public void setVisible(String visible) {
		this.visible = visible;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getPerms() {
		return perms;
	}

	public void setPerms(String perms) {
		this.perms = perms;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public List<SysMenuEntity> getChildren() {
		return children;
	}

	public void setChildren(List<SysMenuEntity> children) {
		this.children = children;
	}

	public Map<String, Object> getParams() {
		return params;
	}

	public void setParams(Map<String, Object> params) {
		this.params = params;
	}

}
